package com.whu.waterworks.action;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

public class SysLoginPageAction extends ActionSupport {

	 /**
	 * 
	 */
	private static final long serialVersionUID = -5205877552084102690L;

	public String execute()
	 {		HttpServletRequest request = ServletActionContext.getRequest();
		if (request.getParameter("error")!=null) {
			request.setAttribute("error", "Invalide username and password.");
		}
		if (request.getParameter("logout")!=null) {
			request.setAttribute("message", "You successfully logout.");
		}
		 return "success";
	 }
}
